package com.example.xiaoyi.weiju.Fremant;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Toast;

import com.example.xiaoyi.weiju.R;

public class FragmentHome extends Fragment implements OnPageChangeListener, OnClickListener {
private Button button1,button2,button3,button4;
String url_weather;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View v=inflater.inflate(R.layout.fragment_home, null);

		button1= (Button) v.findViewById(R.id.btn_lookingweather);
		button1.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Toast.makeText(getActivity(),"欢迎进入天气查询界面",Toast.LENGTH_SHORT).show();
			}
		});
		return v;
	}
	@Override
	public void onClick(View v) {
}
	@Override
	public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {

	}

	@Override
	public void onPageSelected(int position) {

	}

	@Override
	public void onPageScrollStateChanged(int state) {

	}
}

	
	
	
	



